PDF4Java Reference Documentation
com.o2sol.pdf4java.graphics.text Package / PDFTextEngine Class / getStringHeight Method / getStringHeight(String,PDFFont,double,boolean) Method
String to measure.
Font used to draw the string.
Maximum width for wrapping.
True if long words are wrapped at character level if they do not fit entirely on a single line.
In This Topic
    getStringHeight(String,PDFFont,double,boolean) Method
    In This Topic
    Gets the height of the string wrapped at the specified width.
    Syntax
    public static double getStringHeight( 
       java.lang.String s,
       PDFFont font,
       double width,
       boolean forceLongWordsWrap
    )

    Parameters

    s
    String to measure.
    font
    Font used to draw the string.
    width
    Maximum width for wrapping.
    forceLongWordsWrap
    True if long words are wrapped at character level if they do not fit entirely on a single line.

    Return Value

    The total height of the text lines.
    See Also